/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package upc.jfactory.scp.jpa.bean;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author Diego
 */
@Entity
@Table(name = "Rol_X_Postulante", catalog = "DAEPIFS_DB", schema = "dbo")
@NamedQueries({
    @NamedQuery(name = "RolXPostulante.findAll", query = "SELECT r FROM RolXPostulante r"),
    @NamedQuery(name = "RolXPostulante.findByRolId", query = "SELECT r FROM RolXPostulante r WHERE r.rolId = :rolId"),
    @NamedQuery(name = "RolXPostulante.findByPostulanteId", query = "SELECT r FROM RolXPostulante r WHERE r.postulanteId = :postulanteId")})
public class RolXPostulante implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "rol_id", nullable = false)
    private Integer rolId;
    @Column(name = "postulante_id")
    private Integer postulanteId;

    public RolXPostulante() {
    }

    public RolXPostulante(Integer rolId) {
        this.rolId = rolId;
    }

    public Integer getRolId() {
        return rolId;
    }

    public void setRolId(Integer rolId) {
        this.rolId = rolId;
    }

    public Integer getPostulanteId() {
        return postulanteId;
    }

    public void setPostulanteId(Integer postulanteId) {
        this.postulanteId = postulanteId;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (rolId != null ? rolId.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof RolXPostulante)) {
            return false;
        }
        RolXPostulante other = (RolXPostulante) object;
        if ((this.rolId == null && other.rolId != null) || (this.rolId != null && !this.rolId.equals(other.rolId))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "upc.jfactory.scp.jpa.bean.RolXPostulante[rolId=" + rolId + "]";
    }

}
